<%@ page contentType="text/html;charset=UTF-8" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>中央储备粮清算管理系统</title>
		<link rel="stylesheet" href="${pageContext.request.contextPath}/common/css/index.css" type="text/css"></link>
		<%@ include file="/common.jsp"%>
	</head>
	<body style="text-align: center;" scroll=no onload="menuCssCtl('menu_0');openLeft('','${pageContext.request.contextPath}/left_index.jsp');"  >
		<div id="header">
			<div style="background-image:url(${pageContext.request.contextPath}/common/img/index_t_01_01.png);float: left;background-repeat: no-repeat;height: 40px;width: 315px; padding-left:0px;padding-top:20px">
				<div style='margin-bottom:-8px; font-family: "Mv  Boli"; font-size:19px;letter-spacing:3px;font-weight:bold;color: #000000;' >中央储备粮清算管理系统</div>
				<div style='margin-bottom:0px; font-family: "Mv   Boli"; font-size:19px;letter-spacing:3px;font-weight:bold;color: #000000;width:100%;filter:flipv() Alpha(startX=77, startY=0, finishX=77, finishY=202,style=1,opacity=25,finishOpacity=0)'>中央储备粮清算管理系统</div>
			</div>
			<div class="logo_r">
				<form name="form" method="post">
					<div class="logo_s">
						<span class="logininfo">机构:[${user.department }]
							操作员:${user.fullname }[${user.loginid }] </span>
						<span class="relogin" id="relogin" onclick="relogin();">
							重新登录</span>
						<span class="outlogin" id="closewin" onclick="closewin();">退出系统</span>
					</div>
				</form>
				<div class="logo_l"></div>
				<!-- 主导航 -->
				<div id="navmain">
					<div id="menu_0" class="navmain_aa"><a onclick="menuCssCtl('menu_0');openLeft('menu1','${pageContext.request.contextPath}/left_index.jsp','');" >首页</a></div>
                    <div id="menu_1" class="manager_b"><a onclick="menuCssCtl('menu_1');openLeft('menu2','${pageContext.request.contextPath}/left_index.jsp','');" >贷款审批</a></div>
                    <div id="menu_2" class="manager_b"><a onclick="menuCssCtl('menu_2');openLeft('menu3','${pageContext.request.contextPath}/left_index.jsp','');" >会计审批</a></div>
                    <div id="menu_3" class="manager_b"><a onclick="menuCssCtl('menu_3');openLeft('menu4','${pageContext.request.contextPath}/left_index.jsp','');" >财务审批</a></div>
                    <div id="menu_4" class="manager_b"><a onclick="menuCssCtl('menu_4');openLeft('menu5','${pageContext.request.contextPath}/left_index.jsp','');" >报销审批</a></div>
                    <div id="menu_5" class="manager_b"><a onclick="menuCssCtl('menu_5');openLeft('menu6','${pageContext.request.contextPath}/left_index.jsp','');" >通讯录查询</a></div>
                    <div id="menu_6" class="manager_b"><a onclick="menuCssCtl('menu_6');openLeft('menu7','${pageContext.request.contextPath}/left_index.jsp','');" >工作安排</a></div>
                    <div id="menu_7" class="manager_b"><a onclick="menuCssCtl('menu_7');openLeft('menu8','${pageContext.request.contextPath}/left_index.jsp','');" >浏览用户</a></div>
                    <div id="menu_8" class="navmain_g"><a onclick="menuCssCtl('menu_8');openLeft('menu9','${pageContext.request.contextPath}/left_index.jsp','');" >政策法规</a></div>
				</div>
				<!-- 主导航:end -->
			</div>
		</div>
		<div id="mainbody"  >
		<script type="text/javascript">
		var height = document.documentElement.clientHeight-95;
		$('#mainbody').css('height',height);
		</script>
		<div id="sidebar_l">
			<div class="sidebar_top">
				<span id="time" name="time"></span>
			</div>
			<div class="sidebar_m">
				<IFRAME name="leftFrame"  id="leftFrame"  FRAMEBORDER=0 border="0" framespacing="0" SCROLLING=no SRC="" width="100%" height="100%"></IFRAME>
			</div>
		</div>
		<div id="sidebar_r">
			<div class="daohang" id="daohang">
				<div class="anniu-z_01"></div>
				<div id='position' class="anniu-z_022">nihao</div>
				<div class="anniu-z_044"></div>
			</div>
			<script language='javascript'>addformcolor("tab64");</script>
			<div class="zhuti" id="lp" name="lp" >
				<div id="mainFramediv" style="display:block">
					<IFRAME name="mainFrame"  id="mainFrame" FRAMEBORDER=0 border="0" framespacing="0"	SCROLLING=yes SRC="/main.jsp" width="100%" height="100%"></IFRAME>
				</div>
			</div>
		</div>
		<div id='footer'></div>
	</body>
	<script type="text/javascript">
		 var oldId="menu_0";		
		//改变菜单样式		
		function menuCssCtl(Id){
			var elemId="#"+Id;
			if(oldId==Id){
				return;
			}			
			var oldelemId="#"+oldId;
			if($(elemId).hasClass("navmain_a")){
				$(elemId).attr("class","navmain_aa");
				changCss(oldelemId);
				oldId=Id;
				return;
			}
			if($(elemId).hasClass("manager_a")){
				$(elemId).attr("class","manager_aa");
				changCss(oldelemId);
				oldId=Id;
				return;
			}
			
			if($(elemId).hasClass("manager_g")){
				$(elemId).attr("class","manager_gg");
				changCss(oldelemId);
				oldId=Id;
				return;
			}
			if($(elemId).hasClass("navmain_g")){
				$(elemId).attr("class","navmain_gg");
				changCss(oldelemId);
				oldId=Id;
				return;
			}
			if($(elemId).hasClass("navmain_b")){
				$(elemId).attr("class","navmain_bb");
				changCss(oldelemId);
				oldId=Id;
				return;
			}	
			
			if($(elemId).hasClass("manager_b")){
				$(elemId).attr("class","manager_bb");
				changCss(oldelemId);
				oldId=Id;
				return;
			}		
					
		}
	function changCss(elemId){
		if($(elemId).hasClass("navmain_aa")){
			$(elemId).removeClass('navmain_aa');
			$(elemId).addClass('navmain_a');
			return;			
		}
		if($(elemId).hasClass("manager_aa")){
			$(elemId).removeClass('manager_aa');
			$(elemId).addClass('manager_a');
			return;			
		}
		
		
		if($(elemId).hasClass("navmain_bb")){
			$(elemId).removeClass('navmain_bb');
			$(elemId).addClass('navmain_b');
			return;			
		}
			if($(elemId).hasClass("manager_bb")){
			$(elemId).removeClass('manager_bb');
			$(elemId).addClass('manager_b');
			return;			
		}
		
		
		if($(elemId).hasClass("navmain_gg")){
			$(elemId).removeClass('navmain_gg');
			$(elemId).addClass('navmain_g');
			return;			
		}
		
		if($(elemId).hasClass("manager_gg")){
			$(elemId).removeClass('manager_gg');
			$(elemId).addClass('manager_g');
			return;			
		}
	}

	function Test(){
// 		setTimeout('Test();', 1000);
// 		onlineUsersListService.onlineUserInfo(brno, ficode, function(data) {
// 			window.status='目前系统在线人数：'+data.length;
// 		});
	}

	function open_company(jspurl) {
		if (typeof (jspurl) == "undefined" || jspurl.length == 0) {
			jspurl = '${pageContext.request.contextPath}/main.jsp';
		}
		window.open(jspurl, target = "mainFrame");

	}

	function openLeft(menuId,menuUrl,jspurl){
 		open_company("");
		window.open(menuUrl,target="leftFrame");
	}
	
	function closewin(){
		jConfirm('<font color="#D7A728">你确定要<strong>退出</strong>系统？</font>', '系统提示', function(data) {
			if(data){
				window.top.close();
			}
		});
	}
	function relogin() {
		$('form:first').attr("action","${pageContext.request.contextPath}/ykfk/relogin.do");
		$('form:first').submit();
	}
	
	function guanbi(){
		self.showModalDialog("${pageContext.request.contextPath}/logout.jsp","_blank","dialogWidth=12;dialogHeight=8;status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no");
	}
	
	$(window).unload(function(){//页面关闭时清空session
	    guanbi();
	});
	
	$(function(){
		setInterval(function(){ 
			with(new Date) 
			time.innerText = getYear()+"年"+(getMonth()+1)+"月"+getDate()+"日 星期"+"日一二三四五六".charAt(getDay())+" "+(getHours()>9?getHours():("0"+getHours()))+":"+(getMinutes()>9?getMinutes():("0"+getMinutes()))+":"+(getSeconds()>9?getSeconds():("0"+getSeconds()));
		},1000);  
	});
</script>
</html>